﻿using UnityEngine;

/// <summary>
/// 日志工具
/// </summary>
public class Logger
{
    #region PublicStaticField
    public static bool DebugEnable = false;
    public static bool InfoEnable = true;
    public static bool WaringEnable = true;
    public static bool ErrorEnable = true;
    #endregion

    #region Debug
    /// <summary>
    /// debug日志
    /// </summary>
    public static void d(string message)
    {
        if (DebugEnable)
        {
            Debug.Log("Log.d: " + message);
        }
    }
    #endregion

    #region Info
    /// <summary>
    /// info日志
    /// </summary>
    public static void i(string message)
    {
        if (InfoEnable)
        {
            Debug.Log("Log.i: " + message);
        }
    }
    #endregion

    #region Waring
    public static void w(string message)
    {
        if (WaringEnable)
        {
            Debug.LogWarning("Log.w: " + message);
        }
    }
    #endregion

    #region Error
    /// <summary>
    /// error日志
    /// </summary>
    public static void e(string message)
    {
        if (ErrorEnable)
        {
            Debug.LogError("Log.e: " + message);
        }
    }
    #endregion
}